<?php
include_once("include/include.php.inc");

list($status, $user) = auth_get_status();


		switch($status){
			case AUTH_LOGGED:
			?>
		<b><?=$user["name"];?>, you are alerady logged in <a href="logout.php">Logout</a></b>
			<?php
			break;
			case AUTH_NOT_LOGGED:
			?>
<html>
<head></head>
<body>
		<center>
		<form action="index.php" method="post">
			<table cellspacing="2">
				<tr>
					<td><b>Username:</b></td>
					<td><input type="text" name="uname"></td>
				</tr>
				<tr>
					<td><b>Password:</b></td>
					<td><input type="password" name="passw"></td>
				</tr>
				<tr>
					<td colspan="2"><input type="submit" name="action" value="login"></td>
				</tr>
			</table>
		</form></center>
		</body>
		</html>
		<?php
			break;
		}
		?>